Game Dev

Impressions
  • (2025-03-13)

  • I feel like I'm always having to fight the casting system.

    • The system isn't bad, but it's simply VERY verbose and it gets in the way when dealing with APIs, having to do transforms all the time.

    • Making a util.zig  file and defining helper functions to do the casting helps a lot.

  • Compilation times are kind of long.

    • Not absurd, but I feel it can be a problem when dealing with a very large file.

    • So far it's been okay.

  • Dealing with strings is super stressful for game dev.

    • When both strings are comptime, concatenation is okay, but when they're runtime you need to work with allocators, etc.

    • This is not a big problem, because I always avoid using strings anyway, besides that although more work, there is elegance in handling strings as [:0]const u8 .

  • Allocation is a nightmare.

    • (2025-03-28) Lifetimes are simply very complex, even for something simple.

Libraries

Render
ECS

Demos

  • Zig GameDev .

    • zig build simple_raytracer-run

      • Failed to open, does not exist.

Demo: Games
  • Tides of Revival .

    • Tides of Revival .

    • Author's channel video .

      • Seems friendly :)

    • (2025-03-10)

      • I couldn't build it.

      • 0.14.0+ is incompatible.

      • I had issues finding dependencies, etc.

      • I managed to open the file downloaded from itch.io

    • When testing :

      • The game has a long way to go '-', but at the same time it has a nice charm of a pleasant little game.

      • Reminds me of the feeling of playing a Minecraft alpha at night, kind of cool.

      • The game has no options menu and crashes when trying to resize the window.

  • Blockens .

    • (2025-03-10)

      • I only managed to build on 1.12.1.

      • The FPS is INSANELY low; like, 4 fps in the start menu and in-game.

      • The CPU got very hot.

      • The game is not worth it at all, for learning or inspiration.

Mach

About
Impressions
  • I found it a bit uncomfortable to always have a variable called 'mach_system' or 'mech_algo', being an anonymous struct containing method names.

    • From what I understand, this is a way to show Mach which kind of method symbolizes what, so they can be accessed and run  by Mach's API.

  • In this case, pub const main  symbolizes a scheduler to make certain things be called in order, etc, when calling the "main module" (I think main is the module of this script).

    • Since this script is App.zig , this pub const main  indicates the entry point that the main.zig  file (generated by Mach) will call, once everything starts.

  • .

Things made with Mach
  • Games :

    • Aftersun .

      • (2025-03-10)

        • I couldn't build it.

        • 0.13.0 is old, 0.14.0+ is incompatible.

  • Pixel art Editor :

    • Pixi .

      • (2025-03-10)

        • I couldn't build it.

        • 0.13.0 is old, 0.14.0+ is incompatible.

Godot

Impressions
  • (2025-01-18)

    • Extreme boilerplate. Not doable.

    • Very verbose.

    • I really don't like having to deal with object deinitialization.

    • "Actually I don't like usingnamespace either in its current state, but it's the simplest way I can work out to wrap OOP. The fundamental problem is that Zig doesn’t favor OOP at all, there should be some facilities to assist in doing such".

      • The idea of repeatedly using namespaces sounds strange when looking at the code.

    • My feeling is that although Zig is easier to read than Rust, it curiously seems to introduce more boilerplate than Rust, due to the way Godot Zig was implemented. Maybe that will change in the future, but I don't feel it's worth it at all.

Tests
  • (2025-01-18)

    • Did not work with Godot 4.4-beta1, but worked with Godot 4.3.

    • I can use the Godot 4.3 .exe and use the .dll in Godot 4.4-beta1 without problems.

    • Steps:

      • Inside build.zig :

      const godot_path = b.option([]const u8, "godot", "Path to Godot engine binary [default: `godot`]") orelse "C:\\Users\\caior\\Desktop\\Programas\\! Godot Launchers\\Godot_v4.3-stable_win64.exe";`
      
      • zig build